package cn.tedu.hospitalqd.mapper;


import cn.tedu.hospitalqd.pojo.entity.Drug;
import cn.tedu.hospitalqd.pojo.vo.DrugListItemVO;
import cn.tedu.hospitalqd.pojo.vo.DrugStandardVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface DrugMapper {
    int insert(Drug drug);

    int insertBatch(List<Drug> drugs);

    int deleteById(Long id);

    int deleteByIds(Long[] ids);

    int update(Drug drug);

    int count();

    int countByName(String name);

    int countByNameAndNotId(@Param("id")Long id,@Param("name") String name);

    DrugStandardVO getStandardById(Long id);

    List<DrugListItemVO> list();




}
